import request from "@/api/request.js";

export default {
    // 获取电池护照列表（分页）
    getBatteryPassports(params) {
        return request({
            url: '/api/portableBattery/page',
            method: 'get',
            params
        })
    },

    // 获取电池护照详情（通过ID）
    getBatteryPassportById(id) {
        return request({
            url: `/api/portableBattery/${id}`,
            method: 'get'
        })
    },

    // 创建电池护照
    createPortableBattery(data) {
        return request({
            url: '/api/portableBattery',
            method: 'post',
            data
        })
    },

    // 更新电池护照
    updateBatteryPassport(id, data) {
        return request({
            url: `/api/portableBattery/${id}`,
            method: 'put',
            data
        })
    },

    // 删除电池护照
    deleteBatteryPassport(id) {
        return request({
            url: `/api/portableBattery/${id}`,
            method: 'delete'
        })
    },
}